const { DataTypes } = require('sequelize')
const db = require('../db/index')
module.exports = db.define("users", {
    phone: {
        type: DataTypes.CHAR(255),
        allowNull: true,
    },
    password: {
        type: DataTypes.CHAR(255),
        defaultValue: "没有添加",
    },
    name: {
        type: DataTypes.CHAR(255),
        defaultValue: "默认名称",
    },
    img: {
        type: DataTypes.CHAR(255),
        defaultValue: "/img/qqdzz.jpg"
    },
    openid: {
        type: DataTypes.CHAR(255),
        allowNull: true,
    },
    sex: {
        type: DataTypes.INET,
        defaultValue: 0
    }
}, { timestamps: true })